<!doctype html>
<html>
<head>
    <link rel="stylesheet" href="/css/base.css" type="text/css">
    <link rel="stylesheet" href="/css/admin/admin.css" type="text/css">
    <style type="text/css">
        table.list-table th, table.list-table td {
            padding: 5px !important;
        }

        .order_head {
            font-size: 16px;
        }

        .list-table tr td, .list-table tr th {
            border: 1px solid #999999;
            font-size: 12px;
        }

        .list-table tr th {
            background-color: #e0e0e0;
        }

        fieldset {
            border: 1px solid #666666;
            padding: .3em 1em 1em;
        }

        legend {
            padding: .3em 1em;
        }
    </style>
</head>
<body>
<div class="order_head">
    <img src="/images/admin/baobaot_logo.png" style="height: 70px;"> <span style="color:#666;">出库联</span>
    <div style="float: right;text-align: right">
        <div style="padding-right: 20px;">订单编号: {order_helper::order_id_encode($order_info['id'])}</div>
        <div id="barcode" style="float: right;"></div>
    </div>
</div>
<table style="width: 100%;font-size: 12px;line-height: 22px;margin: 5px 0">
    <tr>
        <td>订单类型: {order_config::$order_type[$order_info['type']]}</td>
        <td>订单状态: 已付款</td>
        <td>商品总数量/箱: {$order_count}</td>
        <td>体积/m³: {$order_info.order_cube}</td>
        <td>重量/kg: {$order_info.order_weight}</td>
    </tr>
    <tr>
        <td>收货人: {$order_info.receiver}</td>
        <td colspan="4">电话: {$order_info.mobile}</td>
    </tr>
    <tr>
        <td colspan="5">收货地址: {if $order_info.region}{$order_info.region} {/if}{$order_info.dealer_address}</td>
    </tr>
    {*
    <tr>
        <td>物流公司: {$order_info['express_name']}</td>
        <td colspan="4">物流编号: {$order_info['express_no']}</td>
    </tr>
    *}
</table>
<table class="list-table">
    <tr>
        <th>商品名称</th>
        <th style="width: 10%">商品数量</th>
        <th style="width: 30%">确认签字</th>
    </tr>
    {foreach $order_info.order_relation as $k => $order_relation_info}
    {$goods_info = $order_relation_info.goods_info}
    <tr>
        <td>{$goods_info.title}</td>
        <td>{$order_relation_info.goods_num} {$goods_info.unit}</td>
        <td>&nbsp;</td>
    </tr>
    {/foreach}
    {foreach $order_info.order_exchange_relation as $k => $order_exchange_relation_info}
    {$goods_info = $order_exchange_relation_info.goods_info}
    <tr>
        <td>{$goods_info.title}</td>
        <td>{$order_exchange_relation_info.goods_num}</td>
        <td>&nbsp;</td>
    </tr>
    {/foreach}
    {$cup_list_count = count($cup_list_info)}
    {if $cup_list_count}
    <tr>
        <th colspan="3">杯桶</th>
    </tr>
    {$cup_name_list = cup_config::$cup_type}
    {foreach $cup_list_info as $k => $v}
    <tr>
        <td>{$cup_name_list[$v['cup_type']]}</td>
        <td>{$v['cup_num']} ({$v['true_cup2box_num']} 箱)</td>
        <td>&nbsp;</td>
    </tr>
    {/foreach}
    {/if}
</table>
{if $order_info.note}
<br/>
<fieldset>
    <legend>备注</legend>
    {nl2br($order_info.note)}
</fieldset>
{/if}
<!--end:列表-->
</body>
<script src="/js/jquery-1.7.1.min.js?v=f430f760002395c7fbfc5641e90ff77c"></script>
<script src="/js/jquery/jquery-barcode.min.js"></script>
<script>
    $(function () {
        var settings = {
            barWidth: 2,
            barHeight: 30,
        };
        $("#barcode").barcode("{order_helper::order_id_encode($order_info['id'])}", "code39", settings);
        window.print();
    });
</script>
</html>